package LeetCode.month02.day33;

public class No80 {
    public int removeDuplicates(int[] nums) {
        int n = nums.length;
        int left = 2;
        for (int i = 2; i < n; i++) {
            if(nums[i]!=nums[left-2]) nums[left++] = nums[i];
        }
        return Math.min(left,nums.length);
    }
}
